<?php
Yii::app()->setTimeZone(APP_TIMEZONE);
Yii::setPathOfAlias('options',OPTIONS_FOLDER);
Yii::setPathOfAlias('nte',ROOT);
//Yii::setPathOfAlias('Assets',ROOT);
Yii::setPathOfAlias('frontend',FRONTEND);
Yii::setPathOfAlias('backend',BACKEND);
//sYii::setPathOfAlias('ntewidgets',WIDGETS);

return array(
       
        'id'=> SITE_NAME,
        //Edit more information for your site here
        'name'=> SITE_NAME ,        
        //'sourceLanguage'=>'en_us',

        // preloading 'log' component
        'preload'=>array('log',
                        'bootstrap',
                ),

        // autoloading model and component classes
        'import'=>array(
                'application.models.*',
                // 'application.views.*',
                'application.components.*',
                'application.extensions.bootstrap.widgets.*',
                // 'application.modules.pay.models.*',

                'options.components.*',                                      
                'options.extensions.*',
                'options.models.*',                        
                'options.modules.*',
                'options.storages.*',
               
        'nte.components.*',
        'nte.extensions.*',
        'nte.models.*',
        'nte.modules.*',
        'nte.widgets',

        'nte.modules.rights.*',
        'nte.modules.rights.models.*',
        'nte.modules.rights.components.*',
        'nte.modules.rights.RightsModule',  
        // 'ext.wacf.*',
        // 'ext.wacf.terms.*',
        ),


        'modules'=>array(
                // uncomment the following to enable the Gii tool
               
                'gii'=>array(
                        'class'=>'system.gii.GiiModule',
                        'password'=>'123456',
                        // If removed, Gii defaults to localhost only. Edit carefully to taste.
                        'ipFilters'=>array('127.0.0.1','::1'),
                        'generatorPaths'=>array(
                                  'bootstrap.gii',
                ),
                ),
        //Modules Rights
    'rights'=>array(
            'class'=>'nte.modules.rights.RightsModule',
            //'install'=>false,   // Enables the installer.
            'install'=>true,
            'appLayout'=>'application.views.layouts.main',
            'superuserName'=>'Admin'
        ),                      
        ),
     'preload' => array('log'),
        // application components
    'components'=>array(
                'bootstrap'=>array(
                    'class'=>'ext.bootstrap.components.Bootstrap',
                ),
                'mail' => array(
                    'class' => 'ext.yii-mail.YiiMail',
                    'transportType'=>'smtp',
                    'transportOptions'=>array(
                    'host'=>'smtp.mail.yahoo.com',
                    'username'=>'mr.trieuanh@yahoo.com',//contohna nama_email@yahoo.co.id
                    'password'=>'conduongmoi',
                    'port'=>'465',
                    'encryption'=>'ssl',
                     ),
                'viewPath' => 'application.views.mail',
                'logging' => true,
                'dryRun' => false
                ),
                'user'=>array(
                        // enable cookie-based authentication
                        'allowAutoLogin'=>true,
                ),
            // 'log' => array(
            //     'class' => 'CLogRouter',
            //     'routes' => array(
            //         array(
            //             'class' => 'ext.phpconsole.PhpConsoleYiiExtension',
            //             'handleErrors' => true,
            //             'handleExceptions' => true,
            //             'basePathToStrip' => dirname($_SERVER['DOCUMENT_ROOT'])
            //         )
            //     )
            // ),
            'translate'=>array(
            'class'=>'nte.modules.translate.components.MPTranslate',
            //any avaliable options here
            'acceptedLanguages'=>array(
                'en_us'=>'English',
                'vi_vn'=>'Tiếng Việt'                                                                          
            ),
           
        ),
                // uncomment the following to enable URLs in path-format
                /*
                'urlManager'=>array(
                        'urlFormat'=>'path',
                        'rules'=>array(
                                '<controller:\w+>/<id:\d+>'=>'<controller>/view',
                                '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
                                '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
                        ),
                ),
                */
                // 'db'=>array(
                //         'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
                //         'charset'=>'utf8',
                // ),
                // uncomment the following to use a MySQL database
               
                'db'=>array(
                        'connectionString' => 'mysql:host=localhost;dbname=joco',
                        'emulatePrepare' => true,
                        'username' => 'root',
                        'password' => '',
                        'charset' => 'utf8',
                ),
               
                'errorHandler'=>array(
                        // use 'site/error' action to display errors
                        'errorAction'=>'site/error',
                ),
                'log'=>array(
                        'class'=>'CLogRouter',
                        'routes'=>array(
                                array(
                                        'class'=>'CFileLogRoute',
                                        // 'levels'=>'error, warning,trace',
                                ),
                                // uncomment the following to show log messages on web pages
                               
                                array(
                                        'class'=>'CWebLogRoute',
                                ),
                               
                        ),
                ),
        ),
       

        // application-level parameters that can be accessed
        // using Yii::app()->params['paramName']
        'params'=>array(
                // this is used in contact page
                'adminEmail'=>'mr.trieuanh@yahoo.com',
        ),
);
